package com.study.vue.elementui.entity;

import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.study.vue.elementui.core.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("emp")
@ApiModel("员工表")
public class Emp extends BasicEntity {

    @ApiModelProperty("员工编号")
    @TableId(value = "empno", type = IdType.AUTO)
    private Integer empno;

    @ApiModelProperty("姓名")
    @TableField("ename")
    private String ename;

    @ApiModelProperty("工作")
    @TableField("job")
    private String job;

    @ApiModelProperty("领导编号")
    @TableField("mgr")
    private Integer mgr;

    @ApiModelProperty("入职日期")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField("hiredate")
    private Date hiredate;

    @ApiModelProperty("工资")
    @TableField("sal")
    private Double sal;

    @ApiModelProperty("提成")
    @TableField("comm")
    private Double comm;

    @ApiModelProperty("部门编号")
    @TableField("deptno")
    private Integer deptno;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField("created_time")
    private Date createdTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField("updated_time")
    private Date updatedTime;

    @ApiModelProperty("逻辑删除")
    @TableLogic(value = "0",delval = "1")
    @TableField("is_deleted")
    private Boolean deleted;

    @ApiModelProperty("版本号")
    @Version
    @TableField("version")
    private Integer version;

}
